import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(
      home: TextWidget(),
    ));

class TextWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Text Widget'),
      ),
      body: Column(
        children: [
          Text(
            'Hello World',
            textAlign: TextAlign.left,
            style: TextStyle(
                color: Colors.blue,
                fontSize: 30.0,
                height: 1.2,
                fontFamily: "Courier",
                background: Paint()..color = Colors.yellow,
                decoration: TextDecoration.underline,
                decorationStyle: TextDecorationStyle.dashed),
          ),
          Text(
            "Hello world! I'm Jack. " * 4,
            maxLines: 1,
            style: const TextStyle(fontSize: 30.0),
            overflow: TextOverflow.ellipsis,
          ),
          Text(
            "Hello world! I'm Jack. " * 4,
            maxLines: 1,
            style: const TextStyle(fontSize: 30.0),
            textScaleFactor: 1.5,
          ),
          Text(
            "Hello world! I'm Jack. " * 2,
            style: const TextStyle(fontSize: 30.0),
          ),
          const Text.rich(TextSpan(children: [
            TextSpan(
              text: "Home: ",
              style: TextStyle(fontSize: 20.0),
            ),
            TextSpan(
              text: "https://flutterchina.club",
              style: TextStyle(color: Colors.blue, fontSize: 20.0),
              // recognizer:  _tapRecognizer
            ),
          ])),
        ],
      ),
    );
  }
}
